package org.jeese.demo;

import org.apache.commons.io.FilenameUtils;

/**
 * Created by yezi on 2014/6/2.
 */
public class FilenameUtilsTest {

	public static void main(String[] args) {
		FilenameUtilsTest filenameUtilsTest = new FilenameUtilsTest();
		filenameUtilsTest.test();
	}

	public void test() {
		String filePath = "d:/yezi/xiaoyezi.txt";
		System.out.println(FilenameUtils.getPrefix(filePath));
		System.out.println(FilenameUtils.getExtension(filePath));
		System.out.println(FilenameUtils.getFullPathNoEndSeparator(filePath));
		System.out.println(FilenameUtils.getPathNoEndSeparator(filePath));
		System.out.println(FilenameUtils.getFullPath(filePath));
		System.out.println(FilenameUtils.getBaseName(filePath));
		System.out.println(FilenameUtils.getName(filePath));
		System.out.println(FilenameUtils.getPrefixLength(filePath));
	}
}
